package service;

import annotation.PrivilegeAnno;
import dao.DeptDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import pojo.Dept;

import java.util.List;

@Service
public class DeptServiceImpl implements DeptService {

    @Autowired
    private DeptDao deptDao;

    @Override
    @PrivilegeAnno(name="add")
    public Object addDept(Dept dept) {

        return deptDao.addDept(dept);

    }

    @Override
    public void update(Dept dept) {
        deptDao.update(dept);
    }

    @Override
    public void delete(int deptid) {
        deptDao.delete(deptid);
    }

    @Override
    public List<Dept> findUserAll() {
        return deptDao.findUserAll();
    }

    @Override
    public Dept findUserByNumber(int number) {
        return deptDao.findUserByNumber(number);
    }


}
